Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(behavior_path): use multi thread #657

Merged

Conversation

tkimura4
Copy link
Contributor

@tkimura4 tkimura4 commented Apr 8, 2022

Signed-off-by: tomoya.kimura [email protected]

Description

To solve #275 in behavior path planner, multi thread is used for callbacks by passing a different callback group, whose type is MutuallyExclusive, to each calback.

Related links

#275
#260

Tests performed

Notes for reviewers

Run simple psim, and see if each callback of subscribes is called in a steady cycle.

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

  • The PR follows the pull request guidelines.
  • The PR has been properly tested.
  • The PR has been reviewed by the code owners.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.
  • The PR is ready for merge.

After all checkboxes are checked, anyone who has write access can merge the PR.

@codecov
Copy link

codecov bot commented Apr 8, 2022

Codecov Report

Merging #657 (a949aac) into main (5ab1962) will decrease coverage by 0.03%.
The diff coverage is 0.00%.

@@           Coverage Diff            @@
##            main    #657      +/-   ##
========================================
- Coverage   9.54%   9.50%   -0.04%     
========================================
  Files        921     921              
  Lines      57273   57467     +194     
  Branches    6830    6830              
========================================
  Hits        5465    5465              
- Misses     47306   47500     +194     
  Partials    4502    4502              
Flag Coverage Δ *Carryforward flag
differential 0.00% <0.00%> (?)
total 9.54% <0.00%> (ø) Carriedforward from ba80015

*This pull request uses carry forward flags. Click here to find out more.

Impacted Files Coverage Δ
...th_planner/scene_module/scene_module_interface.hpp 0.00% <0.00%> (ø)
...or_path_planner/src/behavior_path_planner_node.cpp 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c7c31de...a949aac. Read the comment docs.

13304490790 pushed a commit to 13304490790/autoware.universe that referenced this pull request Apr 12, 2022
* release v0.4.0

* Avoid setting CMAKE_BUILD_TYPE=Release in each CMakeLists.txt (autowarefoundation#720)

* remove set CMAKE_BUILD_TYPE Release in each CMakeLists.txt

* remove set CMAKE_BUILD_TYPE Release in ndt_pcl_modified

* set compile options for debug in ndt_omp

* Fix indent

* add warning if -DCMAKE_BUILD_TYPE=Release is not set in ndt_omp

Co-authored-by: Kenji Miyake <[email protected]>

* remove ROS1 packages temporarily

Signed-off-by: mitsudome-r <[email protected]>

* Revert "remove ROS1 packages temporarily"

This reverts commit 2ba159d0875d817ae73a0df4ba12c4660c86acfe.

Signed-off-by: mitsudome-r <[email protected]>

* add COLCON_IGNORE to ros1 packages

Signed-off-by: mitsudome-r <[email protected]>

* Rename launch files to launch.xml (autowarefoundation#28)

* ROS2 Porting: gyro_odometer (autowarefoundation#39)

* Make compile
 - Fix cmake and package.xml
 - Update tf and msgs

* Add publishers, subscribers and loggers
 - Fix launch file and Cmake to generate executable

* Address PR comments:
 - Remove launch file xml line (not needed)
 - Convert Buffer and TransformListener to plain objects
 - Fix some typos

* ported pose2twist from ROS1 to ROS2 (autowarefoundation#19)

* ported pose2twist from ROS1 to ROS2

* Update CMakeLists.txt

updated CMakeLists to be consise using ament_auto

* Update pose2twist_core.cpp

updated the ~Pose2Twist() = default in header

* Update package.xml

sorted dependencies alphabetically

* Update pose2twist_core.h

added  
  ~Pose2Twist() = default;

* Update pose2twist_core.h

Include guards replaced

* edited pose2twist launch file to ROS2

* fixed package XML

* Add geometry2 to repos (autowarefoundation#76)

* add geometry2 package temporarily until new release

Signed-off-by: mitsudome-r <[email protected]>

* trigger-ci

Signed-off-by: mitsudome-r <[email protected]>

* add tf2 dependency to the packages that use tf2_geometry_msgs

Signed-off-by: mitsudome-r <[email protected]>

* Revert "Add geometry2 to repos (autowarefoundation#76)" (autowarefoundation#96)

* Revert "Add geometry2 to repos (autowarefoundation#76)"

This reverts commit 2e5ba3e86d0597920c0adf23f066521ea8a1a5b6.

* Re-add tf2 dependencies

* Revert "Re-add tf2 dependencies"

This reverts commit e23b0c8b0826cf9518924d33349f9de34b4975df.

* Debug CI pipeline

* Revert "Debug CI pipeline"

This reverts commit 58f1eba550360d82c08230552abfb64b33b23e0f.

* Explicitly install known versions of the geometry packages

* No need to skip tf2 packages anymore

Co-authored-by: Esteve Fernandez <[email protected]>

* Rename h files to hpp (autowarefoundation#142)

* Change includes

* Rename files

* Adjustments to make things compile

* Other packages

* Adjust copyright notice on 532 out of 699 source files (autowarefoundation#143)

* Use quotes for includes where appropriate (autowarefoundation#144)

* Use quotes for includes where appropriate

* Fix lint tests

* Make tests pass hopefully

* Run uncrustify on the entire Pilot.Auto codebase (autowarefoundation#151)

* Run uncrustify on the entire Pilot.Auto codebase

* Exclude open PRs

* adding linters to pose2twist (autowarefoundation#193)

* adding linters to gyro_odometer (autowarefoundation#192)

* apply env_var to  use_sim_time (autowarefoundation#222)

* Fix dt in pose2twist (autowarefoundation#289)

* fix dt

Signed-off-by: Kosuke Murakami <[email protected]>

* apply format

Signed-off-by: Kosuke Murakami <[email protected]>

* fix covariance (autowarefoundation#875) (autowarefoundation#267)

Signed-off-by: Yamato Ando <[email protected]>

Co-authored-by: YamatoAndo <[email protected]>

* rm std_msgs (autowarefoundation#359)

* rm_std_msgs (autowarefoundation#402)

* Fix rolling build errors (autowarefoundation#1225)

* Add missing include files

Signed-off-by: Kenji Miyake <[email protected]>

* Replace rclcpp::Duration

Signed-off-by: Kenji Miyake <[email protected]>

* Use reference for exceptions

Signed-off-by: Kenji Miyake <[email protected]>

* Use from_seconds

Signed-off-by: Kenji Miyake <[email protected]>

* Sync public repo (autowarefoundation#1228)

* [simple_planning_simulator] add readme (autowarefoundation#424)

* add readme of simple_planning_simulator

Signed-off-by: Takamasa Horibe <[email protected]>

* Update simulator/simple_planning_simulator/README.md

* set transit_margin_time to intersect. planner (autowarefoundation#460)

* Fix pose2twist (autowarefoundation#462)

Signed-off-by: Takagi, Isamu <[email protected]>

* Ros2 vehicle info param server (autowarefoundation#447)

* add vehicle_info_param_server

* update vehicle info

* apply format

* fix bug

* skip unnecessary search

* delete vehicle param file

* fix bug

* Ros2 fix topic name part2 (autowarefoundation#425)

* Fix topic name of traffic_light_classifier

Signed-off-by: Takagi, Isamu <[email protected]>

* Fix topic name of traffic_light_visualization

Signed-off-by: Takagi, Isamu <[email protected]>

* Fix topic name of traffic_light_ssd_fine_detector

Signed-off-by: Takagi, Isamu <[email protected]>

* Fix topic name of traffic_light_map_based_detector

Signed-off-by: Takagi, Isamu <[email protected]>

* Fix lint traffic_light_recognition

Signed-off-by: Takagi, Isamu <[email protected]>

* Fix lint traffic_light_ssd_fine_detector

Signed-off-by: Takagi, Isamu <[email protected]>

* Fix lint traffic_light_classifier

Signed-off-by: Takagi, Isamu <[email protected]>

* Fix lint traffic_light_classifier

Signed-off-by: Takagi, Isamu <[email protected]>

* Fix lint traffic_light_ssd_fine_detector

Signed-off-by: Takagi, Isamu <[email protected]>

* Fix issues in hdd_reader (autowarefoundation#466)

* Fix some issues detected by Coverity Scan and Clang-Tidy

* Update launch command

* Add more `close(new_sock)`

* Simplify the definitions of struct

* fix: re-construct laneletMapLayer for reindex RTree (autowarefoundation#463)

* Rviz overlay render fix (autowarefoundation#461)

* Moved painiting in SteeringAngle plugin to update()

Signed-off-by: Adam Dabrowski <[email protected]>

* super class now back to MFD

Signed-off-by: Adam Dabrowski <[email protected]>

* uncrustified

Signed-off-by: Adam Dabrowski <[email protected]>

* acquire data in mutex

Signed-off-by: Adam Dabrowski <[email protected]>

* back to RTD as superclass

Signed-off-by: Adam Dabrowski <[email protected]>

* Rviz overlay render in update (autowarefoundation#465)

* Moved painiting in SteeringAngle plugin to update()

Signed-off-by: Adam Dabrowski <[email protected]>

* super class now back to MFD

Signed-off-by: Adam Dabrowski <[email protected]>

* uncrustified

Signed-off-by: Adam Dabrowski <[email protected]>

* acquire data in mutex

Signed-off-by: Adam Dabrowski <[email protected]>

* removed unnecessary includes and some dead code

Signed-off-by: Adam Dabrowski <[email protected]>

* Adepted remaining vehicle plugin classes to render-in-update concept. Returned to MFD superclass

Signed-off-by: Adam Dabrowski <[email protected]>

* restored RTD superclass

Signed-off-by: Adam Dabrowski <[email protected]>

Co-authored-by: Takamasa Horibe <[email protected]>
Co-authored-by: tkimura4 <[email protected]>
Co-authored-by: Takagi, Isamu <[email protected]>
Co-authored-by: Kazuki Miyahara <[email protected]>
Co-authored-by: Makoto Tokunaga <[email protected]>
Co-authored-by: Adam Dąbrowski <[email protected]>

* Fix for rolling (autowarefoundation#1226)

* Replace doc by description

Signed-off-by: Kenji Miyake <[email protected]>

* Replace ns by push-ros-namespace

Signed-off-by: Kenji Miyake <[email protected]>

* Unify Apache-2.0 license name (autowarefoundation#1242)

* Remove use_sim_time for set_parameter (autowarefoundation#1260)

Signed-off-by: wep21 <[email protected]>

* Feature/gyro odometer add twist with cov input (autowarefoundation#1586)

* add description for gyro_odometer package autowarefoundation#1819

* Fix -Wunused-parameter (autowarefoundation#1836)

* Fix -Wunused-parameter

Signed-off-by: Kenji Miyake <[email protected]>

* Fix mistake

Signed-off-by: Kenji Miyake <[email protected]>

* fix spell

* Fix lint issues

Signed-off-by: Kenji Miyake <[email protected]>

* Ignore flake8 warnings

Signed-off-by: Kenji Miyake <[email protected]>

Co-authored-by: Hiroki OTA <[email protected]>

* Invoke code formatter at pre-commit (autowarefoundation#1935)

* Run ament_uncrustify at pre-commit

* Reformat existing files
* Fix copyright and cpplint errors

Signed-off-by: Kenji Miyake <[email protected]>
Co-authored-by: Kenji Miyake <[email protected]>

* Feature/add stop filter ros2 (autowarefoundation#1575)

* revert imu yaw bias (autowarefoundation#2040) (autowarefoundation#2043)

Co-authored-by: YamatoAndo <[email protected]>

* add sort-package-xml hook in pre-commit (autowarefoundation#1881)

* add sort xml hook in pre-commit

* change retval to exit_status

* rename

* add prettier plugin-xml

* use early return

* add license note

* add tier4 license

* restore prettier

* change license order

* move local hooks to public repo

* move prettier-xml to pre-commit-hooks-ros

* update version for bug-fix

* apply pre-commit

* Change formatter to clang-format and black (autowarefoundation#2332)

* Revert "Temporarily comment out pre-commit hooks"

This reverts commit 748e9cdb145ce12f8b520bcbd97f5ff899fc28a3.

* Replace ament_lint_common with autoware_lint_common

Signed-off-by: Kenji Miyake <[email protected]>

* Remove ament_cmake_uncrustify and ament_clang_format

Signed-off-by: Kenji Miyake <[email protected]>

* Apply Black

Signed-off-by: Kenji Miyake <[email protected]>

* Apply clang-format

Signed-off-by: Kenji Miyake <[email protected]>

* Fix build errors

Signed-off-by: Kenji Miyake <[email protected]>

* Fix for cpplint

* Fix include double quotes to angle brackets

Signed-off-by: Kenji Miyake <[email protected]>

* Apply clang-format

Signed-off-by: Kenji Miyake <[email protected]>

* Fix build errors

Signed-off-by: Kenji Miyake <[email protected]>

* Add COLCON_IGNORE (autowarefoundation#500)

Signed-off-by: Kenji Miyake <[email protected]>

* Remove COLCON_IGNORE under localization (autowarefoundation#553)

* [gyro_odometer]add readme (autowarefoundation#625)

* add readme

* update

* update

* Update localization/twist_estimator/gyro_odometer/README.md

Co-authored-by: Kazuki Miyahara <[email protected]>

* add discription

Co-authored-by: Takamasa Horibe <[email protected]>
Co-authored-by: Kazuki Miyahara <[email protected]>

* add readme in pose2twist (autowarefoundation#662)

* add readme

Signed-off-by: Takamasa Horibe <[email protected]>

* Update localization/twist_estimator/pose2twist/src/README.md

Co-authored-by: Kazuki Miyahara <[email protected]>

Co-authored-by: Kazuki Miyahara <[email protected]>

* fix readme (autowarefoundation#669)

Signed-off-by: Takamasa Horibe <[email protected]>

* convert VehicleReport to Twist msgs (autowarefoundation#657)

* add vehicle velocity converter package

* clang format

* add README

* add heading_rate value

* remove twist msg

* clang format

* set covariance value

* fixed bug

* [gyro_odometer] remove input twist (autowarefoundation#706)

* remove input twist

* update README

* fix: move README.md directory

Co-authored-by: mitsudome-r <[email protected]>
Co-authored-by: Daichi Murakami <[email protected]>
Co-authored-by: Kenji Miyake <[email protected]>
Co-authored-by: Nikolai Morin <[email protected]>
Co-authored-by: Jilada Eccleston <[email protected]>
Co-authored-by: nik-tier4 <[email protected]>
Co-authored-by: Ryohsuke Mitsudome <[email protected]>
Co-authored-by: Esteve Fernandez <[email protected]>
Co-authored-by: Kosuke Murakami <[email protected]>
Co-authored-by: Daisuke Nishimatsu <[email protected]>
Co-authored-by: YamatoAndo <[email protected]>
Co-authored-by: taikitanaka3 <[email protected]>
Co-authored-by: Takamasa Horibe <[email protected]>
Co-authored-by: tkimura4 <[email protected]>
Co-authored-by: Takagi, Isamu <[email protected]>
Co-authored-by: Kazuki Miyahara <[email protected]>
Co-authored-by: Makoto Tokunaga <[email protected]>
Co-authored-by: Adam Dąbrowski <[email protected]>
Co-authored-by: Hiroki OTA <[email protected]>
Co-authored-by: Takeshi Ishita <[email protected]>
Co-authored-by: Kenji Miyake <[email protected]>
Co-authored-by: kminoda <[email protected]>
Co-authored-by: autoware-iv-sync-ci[bot] <87871706+autoware-iv-sync-ci[bot]@users.noreply.github.com>
Co-authored-by: Keisuke Shima <[email protected]>
Co-authored-by: Sugatyon <[email protected]>
Co-authored-by: RyuYamamoto <[email protected]>
Signed-off-by: tomoya.kimura <[email protected]>
Signed-off-by: tomoya.kimura <[email protected]>
Signed-off-by: tomoya.kimura <[email protected]>
Signed-off-by: tomoya.kimura <[email protected]>
@tkimura4 tkimura4 force-pushed the feature/multi-thread-behavior-path branch from e12262a to e4b82a3 Compare April 26, 2022 06:16
@tkimura4 tkimura4 marked this pull request as ready for review April 26, 2022 06:16
yukkysaito
yukkysaito previously approved these changes Apr 27, 2022
TakaHoribe
TakaHoribe previously approved these changes Apr 27, 2022
Copy link
Contributor

@TakaHoribe TakaHoribe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It worked fine in psim and the code LGTM too.

@tkimura4 tkimura4 dismissed stale reviews from TakaHoribe and yukkysaito via ba80015 April 28, 2022 08:06
@tkimura4
Copy link
Contributor Author

I've resolved the conflict with main, so please re-approve

Copy link
Contributor

@takayuki5168 takayuki5168 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tkimura4 tkimura4 merged commit 827ff26 into autowarefoundation:main Apr 28, 2022
@tkimura4 tkimura4 deleted the feature/multi-thread-behavior-path branch April 28, 2022 09:19
kosuke55 pushed a commit to kosuke55/autoware.universe that referenced this pull request May 20, 2022
* feat(behavior_path): use multi thread

Signed-off-by: tomoya.kimura <[email protected]>

* fix mutex

Signed-off-by: tomoya.kimura <[email protected]>

* fix double unlock of mutex

Signed-off-by: tomoya.kimura <[email protected]>

* fix multi access to planner_data_

Signed-off-by: tomoya.kimura <[email protected]>

* rename mutex

Signed-off-by: tomoya.kimura <[email protected]>

* apply mutex to bt_manager_

Signed-off-by: tomoya.kimura <[email protected]>

* ci(pre-commit): autofix

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
boyali referenced this pull request in boyali/autoware.universe Sep 28, 2022
* feat(behavior_path): use multi thread

Signed-off-by: tomoya.kimura <[email protected]>

* fix mutex

Signed-off-by: tomoya.kimura <[email protected]>

* fix double unlock of mutex

Signed-off-by: tomoya.kimura <[email protected]>

* fix multi access to planner_data_

Signed-off-by: tomoya.kimura <[email protected]>

* rename mutex

Signed-off-by: tomoya.kimura <[email protected]>

* apply mutex to bt_manager_

Signed-off-by: tomoya.kimura <[email protected]>

* ci(pre-commit): autofix

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
boyali referenced this pull request in boyali/autoware.universe Oct 3, 2022
* feat(behavior_path): use multi thread

Signed-off-by: tomoya.kimura <[email protected]>

* fix mutex

Signed-off-by: tomoya.kimura <[email protected]>

* fix double unlock of mutex

Signed-off-by: tomoya.kimura <[email protected]>

* fix multi access to planner_data_

Signed-off-by: tomoya.kimura <[email protected]>

* rename mutex

Signed-off-by: tomoya.kimura <[email protected]>

* apply mutex to bt_manager_

Signed-off-by: tomoya.kimura <[email protected]>

* ci(pre-commit): autofix

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
boyali referenced this pull request in boyali/autoware.universe Oct 3, 2022
* feat(behavior_path): use multi thread

Signed-off-by: tomoya.kimura <[email protected]>

* fix mutex

Signed-off-by: tomoya.kimura <[email protected]>

* fix double unlock of mutex

Signed-off-by: tomoya.kimura <[email protected]>

* fix multi access to planner_data_

Signed-off-by: tomoya.kimura <[email protected]>

* rename mutex

Signed-off-by: tomoya.kimura <[email protected]>

* apply mutex to bt_manager_

Signed-off-by: tomoya.kimura <[email protected]>

* ci(pre-commit): autofix

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
boyali referenced this pull request in boyali/autoware.universe Oct 19, 2022
* feat(behavior_path): use multi thread

Signed-off-by: tomoya.kimura <[email protected]>

* fix mutex

Signed-off-by: tomoya.kimura <[email protected]>

* fix double unlock of mutex

Signed-off-by: tomoya.kimura <[email protected]>

* fix multi access to planner_data_

Signed-off-by: tomoya.kimura <[email protected]>

* rename mutex

Signed-off-by: tomoya.kimura <[email protected]>

* apply mutex to bt_manager_

Signed-off-by: tomoya.kimura <[email protected]>

* ci(pre-commit): autofix

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
soblin pushed a commit to soblin/autoware.universe that referenced this pull request Jul 25, 2023
…foundation#657)

* Revert "fix(behavior_path_planner): insert stop point in root reference path (autowarefoundation#653)"

This reverts commit 9350e87.

* fix(behavior_path_planner): fix execution request condition

Signed-off-by: Fumiya Watanabe <[email protected]>

---------

Signed-off-by: Fumiya Watanabe <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants